:root {
    --background:#f3f1f9;
    --toast-background: #292B2D;
    --toast-success: #9CE6A8;
    --text: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;  
}

html {
    font-family: Poppins, sans-serif;
}

body {
    background-color: var(--background);
    display: grid;
    place-items: center;
    font-size: 16px;
}

.notification {
    position: absolute;
    bottom: 32px;
    align-items: center;
    border-radius: 0.375rem;
    background-color: var(--toast-background);
    color: var(--text);
    max-width: 20rem;
    width: 100%;
    transform: translateY(30px);
    opacity: 0;
    visibility: hidden;
    animation: fade-in 3s linear;
    border-radius: 0.75rem;
}

.notification__description {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    font-size: 1rem;
    flex-grow: 2;
}

.notification__icon {
    height: 1.625rem;
    width: 1.625rem;
    margin-right: 0.25rem;
}

.notification__body {
    display: flex;
    flex-direction: row;
    padding: 0.75rem;
}

.notification__button {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    border: none;
    background: none;
    font-size: 1.1rem;
    white-space: nowrap;
    margin-left: 1.25rem;
    flex-grow: 1;
    color: var(--text);
}

.notification__button:hover {
    text-decoration: underline;
}


.notification__progress {
    position: absolute;
    right: 0.5rem;
    bottom: 0.25rem;
    width: calc(100% - 1rem);
    height: 0.1875rem;
    transform: scaleX(0);
    transform-origin: right;
    background: linear-gradient(
        to right, 
        var(--toast-background),  
        var(--toast-success)
    );
    border-radius: inherit;
    animation: progress 2.5s 0.3s linear;
}

.icon__wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background-color: var(--toast-success);
    margin-right: 0.5rem;
    padding: 0.375rem;
}

.icon__wrapper svg {
    stroke: var(--toast-background);
    stroke-width: 3px;
}

@keyframes fade-in {
    5% {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    95% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progress {
    to {
        transform: scaleX(1);
    }
}